﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PromeniPodatociVina.aspx.cs" Inherits="PromeniPodatociVina" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" DataSourceID="SqlDataSource1"
        GridLines="None" AutoGenerateColumns="False" DataKeyNames="IDVino">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="IDVino" HeaderText="IDVino" InsertVisible="False" 
                ReadOnly="True" SortExpression="IDVino" />
            <asp:BoundField DataField="ImeVino" HeaderText="ImeVino" 
                SortExpression="ImeVino" />
            <asp:BoundField DataField="CenaZaLitar" HeaderText="CenaZaLitar" 
                SortExpression="CenaZaLitar" />
            <asp:BoundField DataField="SortaNaGrozje" HeaderText="SortaNaGrozje" 
                SortExpression="SortaNaGrozje" />
            <asp:BoundField DataField="Sorta" HeaderText="Sorta" SortExpression="Sorta" />
            <asp:BoundField DataField="Alkohol" HeaderText="Alkohol" 
                SortExpression="Alkohol" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Vinarii.mdb;"  
            ProviderName="System.Data.OleDb" 
            SelectCommand="SELECT IDVino, ImeVino, CenaZaLitar , SortaNaGrozje, Sorta, Alkohol  FROM Vina"
            UpdateCommand="UPDATE Vina SET ImeVino=@ImeVino, CenaZaLitar=@CenaZaLitar, SortaNaGrozje=@SortaNaGrozje, Sorta=@Sorta, Alkohol=@Alkohol WHERE(IDVino = @IDVino)"
            DeleteCommand="DELETE  from [Vina] WHERE [IDVino]=@IDVino" 
            >
        </asp:SqlDataSource>
    </form>
</body>
</html>
